home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gtk+.idb / usr / freeware / info / gtk.info-1.z / gtk.info-1
Encoding:
GNU Info File  |  1999-07-16  |  49.0 KB  |  1,082 lines

  1. This is Info file gtk.info, produced by Makeinfo version 1.68 from the
  2. input file gtk.texi.
  3.  
  4.    This file documents GTK, the GIMP Toolkit
  5.  
  6.    Copyright (C) 1996 Peter Mattis Copyright (C) 1997 Peter Mattis
  7.  
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies
  11.  
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided that the
  14. entire resulting derived work is distributed under the terms of a
  15. permission notice identical to this one.
  16.  
  17.    Permission is granted to copy and distribute translations of this
  18. manual into another language, under the above conditions for modified
  19. versions, except that this permission notice may be stated in a
  20. translation approved by Peter Mattis.
  21.  
  22. INFO-DIR-SECTION User Interface Toolkit
  23. START-INFO-DIR-ENTRY
  24. * GTK: (gtk).        The GIMP Toolkit
  25. END-INFO-DIR-ENTRY
  26.  
  27. 
  28. File: gtk.info,  Node: Top,  Next: Copying,  Prev: (dir),  Up: (dir)
  29.  
  30. The GIMP Toolkit
  31. ****************
  32.  
  33.    This is edition 1.0 of the GTK documentation, 23 August 1998.
  34.  
  35. * Menu:
  36.  
  37. * Copying::                     Your rights.
  38. * Overview::                    What is GTK?
  39. * Types::
  40. * Objects::
  41. * Signals::                     Signals overview.
  42. * Widgets::                     Widget overview.
  43. * Other Objects::               Utility objects.
  44. * Miscellaneous::               Initialization, exit and other features.
  45. * Examples::                    Using GTK.
  46. * Object Implementation::       Object internals.
  47. * Signal Implementation::       Signal internals.
  48. * Widget Implementation::       Widget internals.
  49. * Function Index::              Index of functions.
  50. * Concept Index::               Index of concepts.
  51.  
  52. 
  53. File: gtk.info,  Node: Copying,  Next: Overview,  Prev: Top,  Up: Top
  54.  
  55. Copying
  56. *******
  57.  
  58.    GTK is "free"; this means that everyone is free to use it and free
  59. to redistribute it on a free basis. GTK is not in the public domain; it
  60. is copyrighted and there are restrictions on its distribution, but
  61. these restrictions are designed to permit everything that a good
  62. cooperating citizen would want to do. What is not allowed is to try to
  63. prevent others from further sharing any version of GTK that they might
  64. get from you.
  65.  
  66.    Specifically, we want to make sure that you have the right to give
  67. away copies of GTK, that you receive source code or else can get it if
  68. you want it, that you can change GTK or use pieces of it in new free
  69. programs, and that you know you can do these things.
  70.  
  71.    To make sure that everyone has such rights, we have to forbid you to
  72. deprive anyone else of these rights. For example, if you distribute
  73. copies of GTK, you must give the recipients all the rights that you
  74. have. You must make sure that they, too, receive or can get the source
  75. code. And you must tell them their rights.
  76.  
  77.    Also, for our own protection, we must make certain that everyone
  78. finds out that there is no warranty for GTK. If GTK is modified by
  79. someone else and passed on, we want their recipients to know that what
  80. they have is not what we distributed, so that any problems introduced
  81. by others will no reflect on our reputation.
  82.  
  83.    The precise conditions of the licenses for GTK are found in the
  84. General Public Licenses that accompany it.
  85.  
  86. 
  87. File: gtk.info,  Node: Overview,  Next: Types,  Prev: Copying,  Up: Top
  88.  
  89. What is GTK?
  90. ************
  91.  
  92.    GTK is a library for creating graphical user interfaces similar to
  93. the Motif "look and feel". It is designed to be small and efficient, but
  94. still flexible enough to allow the programmer freedom in the interfaces
  95. created. GTK allows the programmer to use a variety of standard user
  96. interface widgets (*note Widgets::.) such as push, radio and check
  97. buttons, menus, lists and frames. It also provides several "container"
  98. widgets which can be used to control the layout of the user interface
  99. elements.
  100.  
  101.    GTK provides some unique features. (At least, I know of no other
  102. widget library which provides them). For example, a button does not
  103. contain a label, it contains a child widget, which in most instances
  104. will be a label. However, the child widget can also be a pixmap, image
  105. or any combination possible the programmer desires. This flexibility is
  106. adhered to throughout the library.
  107.  
  108.    To make life easier for you, GTK presents this flexibility in a
  109. uniform framework.  Specifically, it implements its own support for
  110. object oriented programming that is well adapted to the purposes of a
  111. user interface toolkit and it aims at providing a reasonable sane and
  112. disciplined programming interface.  This uniformity and discipline is
  113. intended to make it easy and reliable to access GTK from languages other
  114. than C.  Especially more dynamic languages like Perl, Python or Scheme
  115. will find amble support, and in fact, bindings to these languages
  116. already exist.
  117.  
  118. 
  119. File: gtk.info,  Node: Types,  Next: Objects,  Prev: Overview,  Up: Top
  120.  
  121. Types
  122. *****
  123.  
  124.                                  Other kid's games are all such a bore!
  125.                     They've gotta have rules and they gotta keep score!
  126.  
  127.                                           - Calvin about CalvinBall(tm)
  128.  
  129.    GTK implements a semi-simple type system with an associated class
  130. mechanism for widgets and several other useful objects.  This type
  131. system is intended to be general enough to allow both a smooth binding
  132. of dynamically typed languages to Gtk, as well as to serve for a
  133. rigorous and formalistic definition of the larger part of the Gtk API.
  134.  
  135.    The classes for the individual widgets are by far the most important
  136. part of this type system, but before we get to them, we describe the
  137. basics of the type system itself.  This is mostly of interest for widget
  138. writers and language binders, so you might want to skip ahead to the
  139. next chapter, which talks about the object oriented stuff.
  140.  
  141. * Menu:
  142.  
  143. * Type introduction::
  144. * Basics::
  145. * Simple types::
  146. * Enumerations and flags::
  147. * Strings::
  148. * Boxed types::
  149. * Callbacks::
  150. * Composite types::
  151.  
  152. 
  153. File: gtk.info,  Node: Type introduction,  Next: Basics,  Prev: Types,  Up: Types
  154.  
  155. Introduction to the Type System
  156. ===============================
  157.  
  158.    Gtk defines its own system of types, much like a computer language
  159. defines what types it supports.  Of course, the Gtk type system is build
  160. on top of the types that C provides, so it includes members like `int',
  161. `long' and `float'.  But, compared to C, it allows only few carefully
  162. selected types and specifies a lot of restrictions on the way you can
  163. use values of these types.  For example, there is no general facility
  164. for specifying *pointer to X*.  Instead, we take a more higher level
  165. approach and define such things as `string', which is just like a
  166. `char*' but with additional rules about how to manage the memory that
  167. it points to.
  168.  
  169.    The type system has two purposes: to define a formal system with
  170. which to describe the various exported features of Gtk; and to
  171. implement this system at run-time so that we get sound and flexible
  172. "dynamic" types for the dynamic languages that want to interface with
  173. Gtk.
  174.  
  175.    Let me restate this with different words, because I think it is
  176. important to understand this idea.  We will see in a moment that the
  177. type system is indeed well defined and all this detail is implemented
  178. with functions and data structures in Gtk.  For example, every type (and
  179. there can be any number of them) can be represented with a unique
  180. integer and Gtk has support for the necessary bookkeeping for this.
  181. Every type also has a name and there are functions for converting
  182. between the name of a type and its unique number.  Maybe more useful,
  183. there is a big discriminated union that can be used to pass around a
  184. value of any representable type, together with its precise type.
  185.  
  186.    This is the run-time or dynamic side of the type system.  Mostly,
  187. you do not need to use it when you don't want to.  The compile-time or
  188. static side of the type system can is used to statically define the
  189. programming interface of Gtk.  For example, suppose there is function
  190. `gtk_foo' in the Gtk API that has a prototype
  191.  
  192.      char *gtk_foo (char *);
  193.  
  194.    This looks like it does something with strings.  But what does it do
  195. with the memory of the string that has been passed in, and what are we
  196. supposed or allowed to do with the memory that the returned pointer
  197. points to?  The more restricted type `string' from the Gtk type system
  198. can be used to be more precise.  In fact, the definition of `string'
  199. below includes the rule that when a `string' is passed to a function,
  200. that function is not allowed to retain a pointer into the string beyond
  201. the life time of that function call.  So we are safe to deallocate it
  202. or override it when the function has returned.  Likewise, the
  203. definition specifies that the memory of a `string' that is returned
  204. from a function becomes the sole property of the calling function.  The
  205. calling function is responsible for deallocating it eventually and it
  206. can be sure that nobody else scribbles in it.  When `gtk_foo' really
  207. obeys these rules, we can say that it takes one argument, which is a
  208. `string', and it returns a `string'.
  209.  
  210.    Now we can understand why it makes sense to have a more restrictive
  211. type system than that of C.  With it, it is possible to be more precise
  212. and we actually have a framework where we can be sure that as long as we
  213. stay inside this framework we are not gratuitously causing trouble for
  214. languages that are more disciplined than C.  Of course, you are not
  215. restricted to making all your interfaces expressible within the
  216. framework.  There are valid reasons for breaking it, for performance or
  217. simply for convenience.  But please try to provide all the functionality
  218. of your module in such a way that it can be described with this type
  219. system and treat the non-conforming functions as additional goodies that
  220. are nice to have but not essential.  The reward is an instant
  221. accessibility of your code from a huge number of scripting and extension
  222. languages such as Perl, Python, and Guile.
  223.  
  224.    These formal specifications of the Gtk interface are contained in
  225. special declarations in the header files of Gtk.  They are ignored by
  226. the C compiler, but can be used by other language processors.  For extra
  227. convenience, these declarations are also available in a more condensed
  228. form that is easier to parse.  Tools for generating bindings of Gtk to
  229. other languages can read these declarations and--because all the
  230. important details are defined--automatically generate the bulk of the
  231. needed glue code.  It is also possible to feed these declarations into a
  232. running application (a interface builder, say) and thus make it aware of
  233. new widgets and functions without recompiling anything.
  234.  
  235.    The run-time side of the type system is also somewhat introspective.
  236. This means that you can query Gtk about all the members of an
  237. enumeration for example.  Gtk provides tools that help you provide this
  238. introspection for your definitions also.
  239.  
  240.    Types are not enough to completely specify an interface, so GTK also
  241. has "modes".  A mode specifies what happens to a value when it crosses a
  242. module boundary; it can be `in', `out', or `inout'.  Most fundamental
  243. types (and their derived types) support only mode `in'.  The modes
  244. `out' and `inout' can only be used with the composite types: lists and
  245. vectors.  When argument of these types are marked as `out' or `inout'
  246. it means that the called module is allowed to change the contents of
  247. the composite value and that these changes need to be propagated back
  248. to the originator of the value.  Mode `out' means that the argument has
  249. no meaningful value at the beginning and should not be read.  Mode `in'
  250. specifies that the called module is not allowed to change the value in
  251. any way.
  252.  
  253.    The type system allows for an unbounded number of types.  Every
  254. widget is a type for example and you can add new widget types at any
  255. time without confusing the run-time implementation of the type system.
  256. Nevertheless, all types are derived from a certain "fundamental" type,
  257. and there are only a small and finite number of fundamental types.  We
  258. only specify rules for the fundamental types and all other types
  259. inherit these rules from their fundamental type.  For example, `int' is
  260. a fundamental type, as is `GtkObject'.  All widgets derive from
  261. `GtkObject' and so the rules for `GtkObject' apply to all widgets as
  262. well.
  263.  
  264.    This derivation defines a type hierachy, but this hierachy is not
  265. completely general.  You can't derive from `int' for example, and you
  266. can only have one level of derivation from `enum'.  The fundamental
  267. type `GtkObject', however, is the basis for the large and deep
  268. hierarchy of widget types.
  269.  
  270.    The individual fundamental types are defined and explained in the
  271. following sections.  Here is a complete list of them:
  272.  
  273. `none'
  274.      The not-a-value type, similar to `void'.
  275.  
  276. `char'
  277.      A character.  Internationalization issues are still undecided.
  278.  
  279. `bool'
  280.      True or false.
  281.  
  282. `byte, ubyte, int, uint, long, ulong, float, double'
  283.      The usual assortment of scalar types.
  284.  
  285. `string'
  286.      A string.  Internationalization issues are still undecided.
  287.  
  288. `enum, flags'
  289.      Enumerations with a fixed set of literals.  Either used to express
  290.      a single choice from this set or to individually turn on and off
  291.      several flags.
  292.  
  293. `boxed'
  294.      A pointer to an opaque structure that can be copied and destroyed.
  295.  
  296. `callback'
  297.      A pointer to a function with enough extra information so that it
  298.      can also be used for functions written in languages completely
  299.      different from C.
  300.  
  301. `GtkObject'
  302.      A pointer to a GtkObject or derived type.  The fun starts here.
  303.  
  304. `args, slist, dlist, cvec, tvec'
  305.      An assortment of composite types like linked lists and counted or
  306.      zero-terminated arrays.
  307.  
  308. `pointer, signal, c_callback'
  309.      Obsolete types.
  310.  
  311. 
  312. File: gtk.info,  Node: Basics,  Next: Simple types,  Prev: Type introduction,  Up: Types
  313.  
  314. Basic Concepts
  315. ==============
  316.  
  317.    The basis for the type system are the fundamental types.  At
  318. run-time, they are represented by members of the `GtkFundamentalType'
  319. enumeration.  For the static declarations, they are identified with a
  320. unique name.
  321.  
  322.  - Enumeration: GtkFundamentalType
  323.      This enumeration contains a member for each defined fundamental
  324.      type.  Most members are listed along with the description of their
  325.      semantics, but one is listed here:
  326.  
  327.     `GTK_TYPE_INVALID'
  328.           No valid type is derived from this.  Use `GTK_TYPE_INVALID' to
  329.           express exceptional situations.  This member does not really
  330.           correspond to a fundamental type and thus there is no name
  331.           for it.
  332.  
  333.  - Data type: GtkType
  334.      The type `GtkType' holds the run-time representation of a type.  It
  335.      is a integer of a certain size.  The follwing macros are defined to
  336.      access the basic properties of a `GtkType':
  337.  
  338.       - Macro: unsigned int GTK_TYPE_SEQNO (GtkType type)
  339.           Returns the sequence number of TYPE.  The sequence numbers are
  340.           guaranteed to be dense, i.e., you can use them to index a
  341.           table and the table need not be much larger than the number
  342.           of different GtkTypes that you might encounter.
  343.  
  344.       - Macro: GtkFundamentalType GTK_FUNDAMENTAL_TYPE (GtkType type)
  345.           Returns the fundamental type of TYPE.
  346.  
  347.      Both macros simply access different bit-fields of a `GtkType', so
  348.      they are very efficient.
  349.  
  350.    New types are registered with the `gtk_type_unique' function.  Any
  351. kind oftype can be registered with `gtk_type_unique' but there are
  352. convenience functions for most fundamental types.  Each fundamental type
  353. has its own interpretation of the rules below and these convenience
  354. functions should be used to automatically get the type registration
  355. right.  So, don't be put off by the apparent complexity of the interface
  356. to `gtk_type_unique'.  You will be using it only for new widgets, and
  357. there the rules are simple.
  358.  
  359.    The `GtkTypeInfo' structure is used to communicate information to
  360. `gtk_type_unique' as opposed to passing in large numbers of parameters.
  361.  
  362.      typedef struct _GtkTypeInfo GtkTypeInfo;
  363.      
  364.      struct _GtkTypeInfo
  365.      {
  366.        gchar *type_name;
  367.        guint object_size;
  368.        guint class_size;
  369.        GtkClassInitFunc class_init_func;
  370.        GtkObjectInitFunc object_init_func;
  371.        gpointer reserved_1;
  372.        gpointer reserved_2;
  373.        GtkClassInitFunc base_class_init_func;
  374.      }
  375.  
  376.    * The `type_name' field refers to the name of the type.  This is the
  377.      same name that is used in the static definitions.  It is
  378.      convention for the type name to be closely related to the name of
  379.      the underlying C type. For example, the type name of the
  380.      `GtkObject' structure is "GtkObject", and the name of the
  381.      `GtkWindowType' enumeration is "GtkWindowType".  Note that the C
  382.      type corresponding to "GtkObject" is really a pointer to a
  383.      `GtkObject' struct, but the name has no "*" in it.
  384.  
  385.    * The `object_size' field refers to the size in bytes of the C
  386.      structure for types that have such a structure. The easiest (and
  387.      portable) means of computing this size is by using the C `sizeof'
  388.      operator. For instance, the sizeof of the `GtkObject' structure is
  389.      computed by doing `sizeof (GtkObject)'.  When the type has no
  390.      associated structure or when you do not want to support the
  391.      `gtk_type_new' function for the new type, set `object_size' to 0.
  392.      Only types derived from GTK_TYPE_OBJECT can be handled by
  393.      `gtk_type_new', anyway.
  394.  
  395.    * The `class_size' field refers to the size in bytes of the C
  396.      structure for the class.  Again, the `sizeof' operator should be
  397.      used to compute this value.  If you don't want to have a class
  398.      structure for this type, set the field to 0.  `gtk_type_class'
  399.      will then always return `NULL'.
  400.  
  401.    * The `class_init_func' and `base_class_init_func' fields are
  402.      callbacks which are used by the type mechanism to initialize class
  403.      specific fields. The single argument these function taks is a
  404.      pointer to a class structure.  When you do not need one or both of
  405.      them, set the corresponding field to `NULL'.  The
  406.      `class_init_func' will be called at most once, right after the
  407.      class structure of size `class_size' has been allocated.  The
  408.      interaction between `class_init_func' and `base_class_init_func'
  409.      is only really useful for the full-fledged object system.  It is
  410.      described there *note Objects::..
  411.  
  412.    * The `object_init_func' field is a callback which is used by the
  413.      type mechanism to initialize object specific fields for structures
  414.      that have been allocated via `gtk_type_new'. The single argument
  415.      this functions takes is a pointer to an object structure.  If you
  416.      do not want any special object initialization to take place, set
  417.      this to `NULL'.  All object initialization functions for all types
  418.      that are part of the inheritance chain are called, starting with
  419.      the most basic type.
  420.  
  421.  - Function: guint gtk_type_unique (GtkType PARENT_TYPE, GtkTypeInfo
  422.           *TYPE_INFO)
  423.      The PARENT_TYPE is simply the new types parent type. If
  424.      PARENT_TYPE is GTK_TYPE_INVALID, then the new type is a new
  425.      fundamental type.  You should never register new fundamental types.
  426.      TYPE_INFO is a pointer to a structure which contains necessary
  427.      information for construction of the new type.
  428.  
  429.      You can only register a specific name once.
  430.  
  431.  - Function: gchar* gtk_type_name (GtkType TYPE)
  432.      The returned string is the name of TYPE as specified to
  433.      `gtk_type_unique'.
  434.  
  435.  - Function: GtkType gtk_type_from_name (guchar *NAME)
  436.      Return the type associated with NAME. If there is no type
  437.      associated with NAME, then GTK_TYPE_INVALID will be returned.
  438.  
  439.  - Function: GtkType gtk_type_parent (GtkType TYPE)
  440.      Returns the parent type of TYPE or GTK_TYPE_INVALID if TYPE is a
  441.      fundamental type.
  442.  
  443.  - Function: gpointer gtk_type_class (GtkType TYPE)
  444.      Returns the initialized class structure for TYPE. The class
  445.      structure is actually created and initialized the first time it is
  446.      needed.  Refer to *note Objects::. for details on how this
  447.      initialization works for GTK_TYPE_OBJECT derived types.
  448.  
  449.      The returned structure is shared by all objects of TYPE and, as
  450.      such, should not be modified.
  451.  
  452.  - Function: gpointer gtk_type_new (GtkType TYPE)
  453.      Returns a new instance of an TYPE object.  This works only for
  454.      GTK_TYPE_OBJECT derived types.  Please see *note Objects::..
  455.  
  456.  - Function: void gtk_type_describe_heritage (GtkType TYPE)
  457.      Prints the type heritage for TYPE. The heritage for a type
  458.      includes the type and all its parent types up the type tree.
  459.  
  460.  - Function: void gtk_type_describe_tree (GtkType TYPE, gboolean
  461.           SHOW_SIZE)
  462.      Prints the type tree which starts at TYPE. SHOW_SIZE is a boolean
  463.      which determines whether type sizes are printed.
  464.  
  465.  - Function: gboolean gtk_type_is_a (GtkType TYPE, GtkType IS_A_TYPE)
  466.      A predicate function which determines whether the relation TYPE
  467.      is_a IS_A_TYPE is true.
  468.  
  469.    Values of all types can be handled uniformly by storing them into a
  470. `GtkArg' structure.  The `GtkArg' has the following fields:
  471.  
  472. `gchar *name'
  473.      This can be used to give the value represented by this `GtkArg'
  474.      structure a name.  It is not used much.
  475.  
  476. `GtkType type'
  477.      The type of this value.
  478.  
  479. `union d'
  480.      A big union that has (at least conceptually) one member for each
  481.      fundamental type.  You should not access these members directly.
  482.      Rather, use the `GTK_VALUE_*' macros.  There is one macro for each
  483.      fundamental type, and its name is derived from the name of the
  484.      GtkFundamentalType enumeration members simply by replacing
  485.      "Gtk_TYPE" with "GTK_VALUE".  All `GTK_VALUE_*' macros take a
  486.      `GtkArg' structure as their only parameter (*not* a pointer) and
  487.      evaluate to a lvalue.
  488.  
  489.    For example, the accessor for the fundamental type GTK_TYPE_INT is
  490. called GTK_VALUE_INT and you could use it like this:
  491.  
  492.      GtkArg value;
  493.      
  494.      value.name = NULL;
  495.      value.type = GTK_TYPE_INT;
  496.      GTK_VALUE_INT(value) = 7;
  497.  
  498. 
  499. File: gtk.info,  Node: Simple types,  Next: Enumerations and flags,  Prev: Basics,  Up: Types
  500.  
  501. Simple Types
  502. ============
  503.  
  504.    The Gtk type system has a full set of the usual simple types:
  505. integers, floating point numbers, but also boolean and character.  You
  506. can not derive new types from these.
  507.  
  508. Enum              Name        Description                       
  509. GTK_TYPE_NONE     "void"      A type without value.             
  510. GTK_TYPE_CHAR     "char"      A 8-bit unsigned number           
  511.                               representing a character.         
  512.                               Numbers      between 0 and 127    
  513.                               are ASCII, the rest is undefined. 
  514. GTK_TYPE_BOOL     "gboolean"  The boolean type.  It is some     
  515.                               small integer where the number 0  
  516.                                   represents false and 1 is     
  517.                               true.  No other values are        
  518.                               allowed.                          
  519. GTK_TYPE_INT      "gint"      A signed integer with at least    
  520.                               32 bits.                          
  521. GTK_TYPE_UINT     "guint"     A unsigned integer with at least  
  522.                               32 bits.                          
  523. GTK_TYPE_LONG     "glong"     A signed integer with at least    
  524.                               32 bits.                          
  525. GTK_TYPE_ULONG    "gulong"    A unsigned integer with at least  
  526.                               32 bits.  This is large enough to 
  527.                                   hold a coerced pointer.       
  528. GTK_TYPE_FLOAT    "gfloat"    A single precision floating       
  529.                               point number.                     
  530. GTK_TYPE_DOUBLE   "gfloat"    A souble precision floating       
  531.                               point number.                     
  532. GTK_TYPE_POINTER  "gpointer"  A untyped pointer.  Do not use    
  533.                               this if you can avoid it.         
  534.  
  535.    The values of these types are all represented `directly' with the C
  536. types that are indicated in the `name' column above.  *note Boxed
  537. types::. for a discussion of this.
  538.  
  539. 
  540. File: gtk.info,  Node: Enumerations and flags,  Next: Strings,  Prev: Simple types,  Up: Types
  541.  
  542. Enumerations and Flags
  543. ======================
  544.  
  545. 
  546. File: gtk.info,  Node: Strings,  Next: Boxed types,  Prev: Enumerations and flags,  Up: Types
  547.  
  548. Strings
  549. =======
  550.  
  551. 
  552. File: gtk.info,  Node: Boxed types,  Next: Callbacks,  Prev: Strings,  Up: Types
  553.  
  554. Boxed Types
  555. ===========
  556.  
  557. 
  558. File: gtk.info,  Node: Callbacks,  Next: Composite types,  Prev: Boxed types,  Up: Types
  559.  
  560. Callbacks
  561. =========
  562.  
  563. 
  564. File: gtk.info,  Node: Composite types,  Prev: Callbacks,  Up: Types
  565.  
  566. Composite Types
  567. ===============
  568.  
  569. 
  570. File: gtk.info,  Node: Objects,  Next: Signals,  Prev: Types,  Up: Top
  571.  
  572. Objects
  573. *******
  574.  
  575. Object functions
  576. ================
  577.  
  578.    The GtkObject type is the root of the type hierarchy used by GTK. It
  579. provides a minimal set of fields used to implement the actual object,
  580. class and signal mechanisms, as well as several utility routines which
  581. make dealing with objects easier.
  582.  
  583.    For the adventurous, see *Note Object Implementation::.
  584.  
  585.  - Function: guint gtk_object_get_type (void)
  586.      Returns the `GtkObject' type identifier.
  587.  
  588.  - Function: void gtk_object_class_add_signals (GtkObjectClass *CLASS,
  589.           gint *SIGNALS, gint NSIGNALS)
  590.      Adds SIGNALS to the `signals' field in the GtkObjectClass
  591.      structure CLASS. *Note Signals::.
  592.  
  593.  - Function: GtkObject* gtk_object_new (guint TYPE, ...)
  594.  
  595.  - Function: GtkObject* gtk_object_newv (guint TYPE, guint NARGS,
  596.           GtkArg *ARGS)
  597.  
  598.  - Function: void gtk_object_ref (GtkObject *OBJECT);
  599.  
  600.  - Function: void gtk_object_unref (GtkObject *OBJECT);
  601.  
  602.  - Function: void gtk_object_getv (GtkObject *OBJECT, guint NARGS,
  603.           GtkArg *ARGS)
  604.  
  605.  - Function: void gtk_object_set (GtkObject *OBJECT, ...)
  606.  
  607.  - Function: void gtk_object_setv (GtkObject *OBJECT, guint NARGS,
  608.           GtkArg *ARGS)
  609.  
  610.  - Function: GtkArg* gtk_object_query_args (GtkType CLASS_TYPE, guint
  611.           *NARGS)
  612.  
  613.  - Function: void gtk_object_add_arg_type (gchar *ARG_NAME, GtkType
  614.           ARG_TYPE, guint ARG_ID)
  615.  
  616.  - Function: GtkType gtk_object_get_arg_type (gchar *ARG_NAME)
  617.  
  618.  - Function: void gtk_object_destroy (GtkObject *OBJECT)
  619.      Performs checks to make sure it is alright to destroy OBJECT and
  620.      then emits the `destroy' signal. The check which is performed is to
  621.      make sure OBJECT is not already processing another signal. If this
  622.      were the case then destroying the object immediately would
  623.      undoubtedly cause problems as the other signal would not be able
  624.      to tell the object was destroyed. The solution is that if OBJECT
  625.      is processing another signal we mark OBJECT is needing to be
  626.      destroyed. When we finish processing of the other signal we check
  627.      whether the object needs to be destroyed.
  628.  
  629.    The GtkObject type provides a mechanism for associating arbitrary
  630. amounts of data with an object. The data is associated with the object
  631. using a character string key. The functions `gtk_object_set_data',
  632. `gtk_object_get_data', and `gtk_object_remove_data' are the interface
  633. to this mechanism. Two other routines, `gtk_object_set_user_data' and
  634. `gtk_object_get_user_data', exist as convenience functions which simply
  635. use the same mechanism.
  636.  
  637.  - Function: void gtk_object_set_data (GtkObject *OBJECT, const char
  638.           *KEY, gpointer DATA)
  639.      Associate DATA with KEY in the data list of OBJECT.
  640.  
  641.  - Function: gpointer gtk_object_get_data (GtkObject *OBJECT, const
  642.           char *KEY)
  643.      Retrieve the data associated with KEY in the data list of OBJECT.
  644.  
  645.  - Function: void gtk_object_remove_data (GtkObject *OBJECT, const char
  646.           *KEY)
  647.      Remove the data associated with KEY in the data list of OBJECT.
  648.  
  649.  - Function: void gtk_object_set_user_data (GtkObject *OBJECT, gpointer
  650.           DATA)
  651.      Sets DATA into the `user_data' field of OBJECT.
  652.  
  653.  - Function: gpointer gtk_object_get_user_data (GtkObject *OBJECT)
  654.      Returns the `user_data' field of OBJECT.
  655.  
  656.    The GtkObject type also provides a mechanism for specifying
  657. initialization values for fields. This general mechanism is called
  658. object value stacks. The reason for using value stacks is that they can
  659. simplify the life of the programmer. For instance, by default widgets
  660. are non-visible when created. However, the "visible" value for widgets
  661. may be specified so that widgets are made visible when created. (FIXME:
  662. unfinished).
  663.  
  664.  - Function: void gtk_object_value_stack_new (guint OBJECT_TYPE, const
  665.           gchar *VALUE_ID, GtkParamType VALUE_TYPE)
  666.  
  667.  - Function: void gtk_object_push_value (guint OBJECT_TYPE, const gchar
  668.           *VALUE_ID, ...)
  669.      Push a value on the value stack specified by OBJECT_TYPE and
  670.      VALUE_ID. The type of value is implicitly given in the context of
  671.      OBJECT_TYPE and VALUE_ID. (That is, it is not specified explicitly
  672.      in the function call). Only a single extra argument is expected
  673.      which is the data which is to be placed on the stack.
  674.  
  675.  - Function: void gtk_object_pop_value (guint OBJECT_TYPE, const gchar
  676.           *VALUE_ID)
  677.      Pop a value of the value stack specified by OBJECT_TYPE and
  678.      VALUE_ID.
  679.  
  680.  - Function: gint gtk_object_peek_value (guint OBJECT_TYPE, const gchar
  681.           *VALUE_ID, gpointer DATA)
  682.      Peek at the value on the top of the value stack specified by
  683.      OBJECT_TYPE and VALUE_ID. The DATA argument is interpreted as the
  684.      location of where to place the "peeked" data. For instance, if the
  685.      peeked data is of type `GTK_PARAM_POINTER', then DATA will be a
  686.      pointer to a pointer. If the value stack is empty or does not
  687.      exist or an error occurs, `gtk_object_peek_value' will return
  688.      `FALSE'. On success it will return `TRUE'.
  689.  
  690. 
  691. File: gtk.info,  Node: Signals,  Next: Widgets,  Prev: Objects,  Up: Top
  692.  
  693. Signals Overview
  694. ****************
  695.  
  696.    Signals are GTK's method for objects to perform callbacks. A signal
  697. is an event which occurs upon an object. The programmer can connect to a
  698. signal of an object which involves specifying a function to be called
  699. when that signal is emitted in the specified object.
  700.  
  701.    When a signal is emitted, both the class function associated with the
  702. signal (when it was defined) and all signal handlers installed for that
  703. signal on the particular object emitting the signal are called. The
  704. widget programmer can specify whether the class function is to be called
  705. before after or both before and after the signal handlers installed by
  706. the widget user. The widget user can, however, specify that their signal
  707. handler is to be run after the class function (using the "_after"
  708. signal connection routines). Any signal handling function can emit the
  709. same signal on the same object while it is running causing that signal
  710. emission to either restart or to run recursively. Additionally, signal
  711. emission can be terminated prematurely. While both such abilities are
  712. rarely used, they do allow for greater flexibility in regards to
  713. signals. For instance, a programmer can attach to the key press event
  714. signal and intercept all tab key presses from a widget. This particular
  715. example is used in the file selection dialog to implement tab completion
  716. of filenames and prevent the entry widget from inserting the tab into
  717. its buffer.
  718.  
  719.    Signals are selected using either an integer identifier or a
  720. character string name. It is convention to name the signal the same as
  721. the class function which is associated with it. There are two versions
  722. of most of the signal functions, one which takes an integer identifier
  723. and one which takes a character string name for the signal.
  724.  
  725.  - Function: gint gtk_signal_new (gchar *NAME, GtkSignalRunType
  726.           RUN_TYPE, gint OBJECT_TYPE, gint FUNCTION_OFFSET,
  727.           GtkSignalMarshaller MARSHALLER, GtkParamType RETURN_VAL, gint
  728.           NPARAMS, ...)
  729.      Create a new signal and give it the character string identifier
  730.      NAME. NAME needs to be unique in the context of OBJECT_TYPE's
  731.      branch of the class hierarchy. That is, OBJECT_TYPE cannot create
  732.      a signal type with the same name as a signal type created by one
  733.      of its parent types.
  734.  
  735.      RUN_TYPE specifies whether the class function should be run before
  736.      (`GTK_RUN_FIRST'), after (`GTK_RUN_LAST') or both before and after
  737.      normal signal handlers (`GTK_RUN_BOTH'). Additionally, the
  738.      `GTK_RUN_NO_RECURSE' value can be or'ed with any of those values to
  739.      specify that the signal should not be recursive. By default,
  740.      emitting the same signal on the same widget will cause the signal
  741.      to be emitted twice. However, if the `GTK_RUN_NO_RECURSE' flag is
  742.      specified, emitting the same signal on the same widget will cause
  743.      the current signal emission to be restarted. This allows the
  744.      widget programmer to specify the semantics of signal emission on a
  745.      per signal basis. (The `GTK_RUN_NO_RECURSE' flag is used by the
  746.      GtkAdjustment widget).
  747.  
  748.      The FUNCTION_OFFSET is the byte offset from the start of the class
  749.      structure to the class function field within the class structure.
  750.      The easiest means to compute this offset is by using the
  751.      `GTK_SIGNAL_OFFSET' macro which takes the class structure type as
  752.      the first argument and the field as the second argument. For
  753.      example, `GTK_SIGNAL_OFFSET (GtkObjectClass, destroy)' will give
  754.      the offset of the `destroy' class function within the
  755.      `GtkObjectClass'. Note: An offset is specified instead of an
  756.      absolute location since there will be multiple instances of a class
  757.      structure being referenced. (The `GtkWidgetClass' structure "is a"
  758.      `GtkObjectClass' structure, etc.)
  759.  
  760.      The MARSHALLER function is used to invoke a signal handler. Since
  761.      signal handlers may take different parameters and return values
  762.      and a general mechanism for invoking them is not apparent, the
  763.      approach of making the signal creator responsible for invoking the
  764.      signal handler was taken. (FIXME: unfinished).
  765.  
  766.      The RETURN_VAL and NPARAMS and the remaining arguments specify the
  767.      return value and the arguments to the signal handler respectively.
  768.      Note: There is an implicit first argument to every signal handler
  769.      which is the widget the signal has been emitted from. The variable
  770.      argument list (...) specifies the types of the arguments. These
  771.      can be one of `GTK_PARAM_CHAR', `GTK_PARAM_SHORT',
  772.      `GTK_PARAM_INT', `GTK_PARAM_LONG', `GTK_PARAM_POINTER' or
  773.      `GTK_PARAM_FUNCTION'. It is undefined to specify `GTK_PARAM_NONE'
  774.      as an argument type, however it is OK to use `GTK_PARAM_NONE' for
  775.      RETURN_VAL. (This corresponds to returning a `void').
  776.  
  777.      `gtk_signal_new' returns the integer identifier of the newly
  778.      created signal. Signal identifiers start numbering at 1 and
  779.      increase upwards. A value of -1 will be returned if an error
  780.      occurs.
  781.  
  782.      *Note:* `gtk_signal_new' is only needed by widget writers. A
  783.      normal user of GTK will never needed to invoke this function.
  784.  
  785.  - Function: gint gtk_signal_lookup (gchar *NAME, gint OBJECT_TYPE)
  786.      Returns the integer identifier for the signal referenced by NAME
  787.      and OBJECT_TYPE. If OBJECT_TYPE does not define the signal NAME,
  788.      then the signal is looked for in OBJECT_TYPE's parent type
  789.      recursively.
  790.  
  791.  - Function: gchar* gtk_signal_name (gint SIGNAL_NUM)
  792.  
  793.  - Function: gint gtk_signal_emit (GtkObject *OBJECT, gint SIGNAL_TYPE,
  794.           ...)
  795.      Emit the signal specified by the integer identifier SIGNAL_TYPE
  796.      from OBJECT. If an error occurs, `gtk_signal_emit' will return
  797.      `FALSE' and will return `TRUE' on success. The signal definition
  798.      determines the parameters passed in the variable argument list
  799.      (`...'). For example, if the signal is defined as:
  800.  
  801.             gint (* event) (GtkWidget *widget, GdkEvent *event);
  802.  
  803.      Then a call to emit the "event" signal would look like:
  804.  
  805.             GdkEvent event;
  806.             gint return_val;
  807.             ...
  808.             gtk_signal_emit (some_object,
  809.                              gtk_signal_lookup ("event",
  810.                                GTK_OBJECT_TYPE (some_object)),
  811.                              &event, &return_val);
  812.  
  813.      Notice that the `widget' argument is implicit in that the first
  814.      argument to every signal is a type derived from `GtkObject'. The
  815.      RETURN_VAL argument is actually a pointer to the return value type
  816.      since the signal mechanism needs to be able to place the return
  817.      value in an actual location. And lastly, the `gtk_signal_lookup'
  818.      call is normally avoided by using the `gtk_signal_emit_by_name'
  819.      function instead. `gtk_signal_emit' is normally used internally by
  820.      widgets which know the signal identifier (since they defined the
  821.      signal) and can therefore side-step the cost of calling
  822.      `gtk_signal_lookup'.
  823.  
  824.  - Function: gint gtk_signal_emit_by_name (GtkObject *OBJECT, gchar
  825.           *NAME, ...)
  826.      Similar to `gtk_signal_emit' except that the signal is referenced
  827.      by NAME instead of by its integer identifier.
  828.  
  829.  - Function: void gtk_signal_emit_stop (GtkObject *OBJECT, gint
  830.           SIGNAL_TYPE)
  831.      Stop the emission of the signal SIGNAL_TYPE on OBJECT. SIGNAL_TYPE
  832.      is the integer identifier for the signal and can be determined
  833.      using the function `gtk_signal_lookup'. Alternatively, the function
  834.      `gtk_signal_emit_stop_by_name' can be used to refer to the signal
  835.      by name. Attempting to stop the emission of a signal that isn't
  836.      being emitted does nothing.
  837.  
  838.  - Function: void gtk_signal_emit_stop_by_name (GtkObject *OBJECT,
  839.           gchar *NAME)
  840.      Similar to `gtk_signal_emit_stop' except that the signal is
  841.      referenced by NAME instead of by its integer identifier.
  842.  
  843.  - Function: gint gtk_signal_connect (GtkObject *OBJECT, gchar *NAME,
  844.           GtkSignalFunc FUNC, gpointer FUNC_DATA)
  845.      Connects a signal handling function to a signal emitting object.
  846.      FUNC is connected to the signal NAME emitted by OBJECT. The
  847.      arguments and returns type of FUNC should match the arguments and
  848.      return type of the signal NAME. However, FUNC may take the extra
  849.      argument of FUNC_DATA. Due to the C calling convention it is OK to
  850.      ignore the extra argument. (It is OK to ignore all the arguments
  851.      in fact).
  852.  
  853.      `gtk_signal_connect' returns an integer identifier for the
  854.      connection which can be used to refer to it in the future.
  855.      Specifically it is useful for removing the connection and/or
  856.      blocking it from being used.
  857.  
  858.  - Function: gint gtk_signal_connect_after (GtkObject *OBJECT, gchar
  859.           *NAME, GtkSignalFunc FUNC, gpointer FUNC_DATA)
  860.      Similar to `gtk_signal_connect' except the signal handler is
  861.      connected in the "after" slot. This allows a signal handler to be
  862.      guaranteed to run after other signal handlers connected to the same
  863.      signal on the same object and after the class function associated
  864.      with the signal.
  865.  
  866.      Like `gtk_signal_connect', `gtk_signal_connect_after' returns an
  867.      integer identifier which can be used to refer to the connection.
  868.  
  869.  - Function: gint gtk_signal_connect_object (GtkObject *OBJECT, gchar
  870.           *NAME, GtkSignalFunc FUNC, GtkObject *SLOT_OBJECT)
  871.      Connects FUNC to the signal NAME emitted by OBJECT. Similar to
  872.      `gtk_signal_connect' with the difference that SLOT_OBJECT is
  873.      passed as the first parameter to FUNC instead of the signal
  874.      emitting object. This can be useful for connecting a signal
  875.      emitted by one object to a signal in another object. A common
  876.      usage is to connect the "destroy" signal of dialog to the "clicked"
  877.      signal emitted by a "close" button in the dialog. That is, the
  878.      "clicked" signal emitted by the button will caused the "destroy"
  879.      signal to be emitted for the dialog. This is also the "right" way
  880.      to handle closing of a dialog since the "destroy" signal will be
  881.      sent if the dialog is deleted using a window manager function and
  882.      this enables the two methods of closing the window to be handled
  883.      by the same mechanism. Returns an integer identifier which can be
  884.      used to refer to the connection.
  885.  
  886.  - Function: gint gtk_signal_connect_object_after (GtkObject *OBJECT,
  887.           gchar *NAME, GtkSignalFunc FUNC, GtkObject *SLOT_OBJECT)
  888.      Similar to `gtk_signal_connect_object' except the signal handler is
  889.      connected in the "after" slot. This allows a signal handler to be
  890.      guaranteed to run after other signal handlers connected to the same
  891.      signal on the same object and after the class function associated
  892.      with the signal. Returns an integer identifier which can be used
  893.      to refer to the connection.
  894.  
  895.  - Function: gint gtk_signal_connect_interp (GtkObject *OBJECT, gchar
  896.           *NAME, GtkCallbackMarshal FUNC, gpointer DATA,
  897.           GtkDestroyNotify DESTROY_FUNC, gint AFTER)
  898.  
  899.  - Function: void gtk_signal_disconnect (GtkObject *OBJECT, gint ID)
  900.      Disconnects a signal handler from an object. The signal handler is
  901.      identified by the integer ID which is returned by the
  902.      `gtk_signal_connect*' family of functions.
  903.  
  904.  - Function: void gtk_signal_disconnect_by_data (GtkObject *OBJECT,
  905.           gpointer DATA)
  906.      Disconnects a signal handler from an object. The signal handler is
  907.      identified by the DATA argument specified as the FUNC_DATA
  908.      argument to the `gtk_signal_connect*' family of functions. For the
  909.      `gtk_signal_connect_object*' functions, DATA refers to the
  910.      SLOT_OBJECT.
  911.  
  912.      *Note:* This will remove all signal handlers connected to OBJECT
  913.      which were connected using DATA as their FUNC_DATA argument.
  914.      Multiple signal handlers may be disconnected with this call.
  915.  
  916.  - Function: void gtk_signal_handler_block (GtkObject *OBJECT, gint ID)
  917.      Blocks calling of a signal handler during signal emission. The
  918.      signal handler is identified by the integer ID which is returned
  919.      by the `gtk_signal_connect*' family of functions. If the signal is
  920.      already blocked no change is made.
  921.  
  922.  - Function: void gtk_signal_handler_block_by_data (GtkObject *OBJECT,
  923.           gint DATA)
  924.      Blocks calling of a signal handler during signal emission. The
  925.      signal handler is identified by the DATA argument specified as the
  926.      FUNC_DATA argument to the `gtk_signal_connect*' family of
  927.      functions. For the `gtk_signal_connect_object*' functions, DATA
  928.      refers to the SLOT_OBJECT. If the signal is already blocked no
  929.      change is made.
  930.  
  931.      *Note:* This will block all signal handlers connected to OBJECT
  932.      which were connected using DATA as their FUNC_DATA argument.
  933.      Multiple signal handlers may be blocked with this call.
  934.  
  935.  - Function: void gtk_signal_handler_unblock (GtkObject *OBJECT, gint
  936.           ID)
  937.      Unblocks calling of a signal handler during signal emission. The
  938.      signal handler is identified by the integer ID which is returned
  939.      by the `gtk_signal_connect*' family of functions. If the signal is
  940.      already unblocked no change is made.
  941.  
  942.  - Function: void gtk_signal_handler_unblock_by_data (GtkObject
  943.           *OBJECT, gint DATA)
  944.      Unblocks calling of a signal handler during signal emission. The
  945.      signal handler is identified by the DATA argument specified as the
  946.      FUNC_DATA argument to the `gtk_signal_connect*' family of
  947.      functions. For the `gtk_signal_connect_object*' functions, DATA
  948.      refers to the SLOT_OBJECT. If the signal is already unblocked no
  949.      change is made.
  950.  
  951.      *Note:* This will unblock all signal handlers connected to OBJECT
  952.      which were connected using DATA as their FUNC_DATA argument.
  953.      Multiple signal handlers may be unblocked with this call.
  954.  
  955.  - Function: void gtk_signal_handlers_destroy (GtkObject *OBJECT)
  956.      Destroy all of the signal handlers connected to OBJECT. There
  957.      should normally never be reason to call this function as it is
  958.      called automatically when OBJECT is destroyed.
  959.  
  960.  - Function: void gtk_signal_default_marshaller (GtkObject *OBJECT,
  961.           GtkSignalFunc FUNC, gpointer FUNC_DATA, GtkSignalParam
  962.           *PARAMS)
  963.      `gtk_signal_new' requires a callback in order to actually call a
  964.      signal handler for a particular signal. The vast majority of
  965.      signals are of the particular form:
  966.  
  967.             (* std_signal) (gpointer std_arg);
  968.  
  969.      `gtk_signal_default_marshaller' is a signal marshaller which
  970.      marshals arguments for a signal of that form.
  971.  
  972.  - Function: void gtk_signal_set_funcs (GtkSignalMarshal MARSHAL_FUNC,
  973.           GtkSignalDestroy DESTROY_FUN)
  974.  
  975. 
  976. File: gtk.info,  Node: Widgets,  Next: Other Objects,  Prev: Signals,  Up: Top
  977.  
  978. Widget Overview
  979. ***************
  980.  
  981.    Widgets are the general term used to describe user interface
  982. objects. A widget defines a class interface that all user interface
  983. objects conform to. This interface allows a uniform method for dealing
  984. with operations common to all objects such as hiding and showing, size
  985. requisition and allocation and events.
  986.  
  987.    The common interface that widgets must adhere to is described by the
  988. GtkWidget and GtkWidgetClass structure. For the purposes of using GTK
  989. these structures can be considered read-only and, for the most part,
  990. opaque.
  991.  
  992.    All widget creation routines in GTK return pointers to GtkWidget
  993. structures. In reality, all widget creation routines create structures
  994. that can be viewed as equivalent to the GtkWidget structure, but often
  995. have contain additional information. *Note Object Implementation::.
  996.  
  997.    The widgets available for use are implemented in a hierarchy. Several
  998. widgets exist solely as common bases for more specific widgets. For
  999. example, it is not possible to create a ruler widget itself, but the
  1000. ruler widget provides a base and functionality common to the horizontal
  1001. and vertical rulers.
  1002.  
  1003.    The available widgets (in alphabetical order):
  1004.  
  1005. * Menu:
  1006.  
  1007. * GtkAlignment::                The alignment widget.
  1008. * GtkArrow::                    The arrow widget.
  1009. * GtkAspectFrame::              The aspect frame widget.
  1010. * GtkBin::                      The bin widget.
  1011. * GtkBox::                      The box widget.
  1012. * GtkButtonBox::                The button box widget.
  1013. * GtkButton::                   The button widget.
  1014. * GtkCheckButton::              The check button widget.
  1015. * GtkCheckMenuItem::            The check menu item widget.
  1016. * GtkCList::                    The compound list widget.
  1017. * GtkColorSelection::           The color selector widget.
  1018. * GtkCombo::                    The combo box widget.
  1019. * GtkContainer::                The container widget.
  1020. * GtkCTree::                    The multi-column tree widget.
  1021. * GtkCurve::                    The curve widget.
  1022. * GtkGammaCurve::               The gamma curve widget.
  1023. * GtkDialog::                   The dialog widget.
  1024. * GtkDrawingArea::              The drawing area widget.
  1025. * GtkEntry::                    The entry widget.
  1026. * GtkEventBox::                 The event box widget.
  1027. * GtkFileSelection::            The file selection dialog widget.
  1028. * GtkFixed::                    The fixed widget.
  1029. * GtkFrame::                    The frame widget.
  1030. * GtkGamma::                    The gamma widget.
  1031. * GtkHBox::                     The horizontal box widget.
  1032. * GtkHButtonBox::               The horizontal button box widget.
  1033. * GtkHPaned::                   The horizontal paned widget.
  1034. * GtkHRuler::                   The horizontal ruler widget.
  1035. * GtkHScale::                   The horizontal scale widget.
  1036. * GtkHScrollbar::               The horizontal scrollbar widget.
  1037. * GtkHSeparator::               The horizontal separator widget.
  1038. * GtkImage::                    The image widget.
  1039. * GtkInputDialog::              The input dialog widget.
  1040. * GtkItem::                     The item widget.
  1041. * GtkLabel::                    The label widget.
  1042. * GtkList::                     The list widget.
  1043. * GtkListItem::                 The list item widget.
  1044. * GtkMenu::                     The menu widget.
  1045. * GtkMenuBar::                  The menu bar widget.
  1046. * GtkMenuItem::                 The menu item widget.
  1047. * GtkMenuShell::                The menu shell widget.
  1048. * GtkMisc::                     The misc widget.
  1049. * GtkNotebook::                 The notebook widget.
  1050. * GtkOptionMenu::               The option menu widget.
  1051. * GtkPaned::                    The paned widget.
  1052. * GtkPixmap::                   The pixmap widget.
  1053. * GtkPreview::                  The preview widget.
  1054. * GtkProgressBar::              The progress bar widget.
  1055. * GtkRadioButton::              The radio button widget.
  1056. * GtkRadioMenuItem::            The radio menu item widget.
  1057. * GtkRange::                    The range widget.
  1058. * GtkRuler::                    The ruler widget.
  1059. * GtkScale::                    The scale widget.
  1060. * GtkScrollbar::                The scrollbar widget.
  1061. * GtkScrolledWindow::           The scrolled window widget.
  1062. * GtkSeparator::                The separator widget.
  1063. * GtkStatusbar::                The statusbar widget.
  1064. * GtkTable::                    The table widget.
  1065. * GtkText::                     The text widget.
  1066. * GtkToggleButton::             The toggle button widget.
  1067. * GtkToolbar::                  The tool bar widget.
  1068. * GtkTooltips::                 The tool tips widget.
  1069. * GtkTree::                     The tree widget.
  1070. * GtkTreeItem::                 The tree item widget.
  1071. * GtkVBox::                     The vertical box widget.
  1072. * GtkVButtonBox::               The vertical button box widget.
  1073. * GtkViewport::                 The viewport widget.
  1074. * GtkVPaned::                   The vertical paned widget.
  1075. * GtkVRuler::                   The vertical ruler widget.
  1076. * GtkVScale::                   The vertical scale widget.
  1077. * GtkVScrollbar::               The vertical scrollbar widget.
  1078. * GtkVSeparator::               The vertical separator widget.
  1079. * GtkWidget::                   The base widget type.
  1080. * GtkWindow::                   The window widget.
  1081.  
  1082.